package java99;

public class Type {
    public static void main(String[] args) {
        String name = "张三";//%s
        int age = 18;
        char sex = '男';
        double score = 99.5;
        boolean b = true;

        System.out.println("姓名：" + name + ",性别：" + sex + ",年龄：" + age + ",婚否：" + b + ",成绩：" + score);

        String s = String.format("姓名：%s,性别：%c,年龄：%d,婚否：%b,成绩：%f", name, sex, age, b, score);
        System.out.println(s);

    }
}

